// import { Circle } from "ol/geom";
import Fill from "ol/style/Fill";
import Icon from "ol/style/Icon";
import Stroke from "ol/style/Stroke";
import Style from "ol/style/Style";
import Text from "ol/style/Text";

import { Circle as CircleStyle} from 'ol/style'
// 图层配置
export class LayerConstant {
  static YZT_YX_2017_RS = 'YZT_YX_2017_RS' // 粤政图影像2017
  static OSM = 'OSM'
  static BINGS = 'BINGS'

  static TIANDITU_RS = 'TIANDITU_RS'
  static TIANDITU_VT = 'TIANDITU_VT'

  static VECTOR_VT = 'VECTOR_VT' // 天地图 矢量底图
  static TERRAIN_TG = 'TERRAIN_TG' //  天地图 地形晕渲

  static GOOGLE_RS = 'GOOGLE_RS'
  static GOOGLE_VT = 'GOOGLE_VT'

  static AMAP_VT = 'AMAP_VT'

  static GEOQ_VT = 'GEOQ_VT'

  static GEOSERVER = 'GEOSERVER'

  static AGS_DYNAMIC = 'ArcGIS_DYNAMIC'
  static AGS_TILE = 'ArcGIS_TILE'
  static AGS_CACHE = 'ArcGIS_CACHE'

  static LabelLayerZIndex = 1
  static LayerZIndex = 0

  static GEODATA_INDUSTRY = 'GEODATA_INDUSTRY'
  static GEOJSON = 'GEOJSON'
  static MULTIPOLYGON = 'MultiPolygon'

  static DEFAULT_ZINDEX = 0
  static DEFAULT_INDUSTRY_ZINDEX = 2
  static DEFAULT_VISIBLE = true
  static DEFAULT_CLUSTER = false
  static DEFAULT_VECTOR_STYLE = new Style({
    fill: new Fill({
      color: 'rgba(255, 255, 255, 0.6)',
    }),
    stroke: new Stroke({
      color: '#319FD3',
      width: 2,
    }),
    text: new Text({
      font: '14px Calibri,sans-serif',
      fill: new Fill({
        color: '#000',
      }),
      stroke: new Stroke({
        color: '#fff',
        width: 3,
      }),
    }),
  })

  static DEFAULT_DRAW_STYLE = [
    new Style({
      stroke: new Stroke({
        color: '#ffffff',
        width: 3,
      }),
    }),
    LayerConstant.DEFAULT_VECTOR_STYLE,
  ]

  static DEFAULT_MEASURE_STYLE = new Style({
    image: new CircleStyle({
      radius: 6,
      stroke: new Stroke({
        color: 'rgba(230,152,45,0.9)',
        width: 2,
      }),
      fill: new Fill({
        color: 'rgba(255, 255, 255, 0.9)',
      }),
    }),
    fill: new Fill({
      color: 'rgba(98, 235, 226, 0.2)',
    }),
    stroke: new Stroke({
      color: 'rgb(98, 235, 226)',
      width: 2,
    }),
  })
  static DEAULT_DRAW_INDEX = 100
  static DRAW_LAYER_ID = 'drawlayer'
  static DRAW_LAYER_TYPE = 'draw'
  static MEASURE_LAYER_TYPE = 'measure'
  static CLUSTER_LAYER_DISTANCE = 50
}
